<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>编辑产品</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <link href="../../layui/v2.9.8/css/layui.css" rel="stylesheet">
    <link href="../../css/basic.css" rel="stylesheet">
</head>
<body>

<form class="layui-form layui-form-pane layer-content-area" id="productForm" action="" lay-filter="product-val-filter">
    <!-- 当前数据的ID -->
    <input type="hidden" name="code" id="code" value=""/>
    <input type="hidden" name="productImg" id="productImg" value=""/>
    <input type="hidden" name="materialList" id="materialList" value=""/>

    <div class="layui-form-item">
        <label class="layui-form-label">产品编码</label>
        <div class="layui-input-block">
            <input type="text" name="productCode" autocomplete="off" placeholder="请输入" lay-verify="required"
                   class="layui-input" disabled>
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">产品名称</label>
        <div class="layui-input-block">
            <input type="text" name="productName" autocomplete="off" placeholder="请输入" lay-verify="required"
                   class="layui-input">
        </div>
    </div>
    <div class="layui-form-item">
        <div class="layui-inline">
            <label class="layui-form-label">分类</label>
            <div class="layui-input-inline" style="width: 300px;">
                <select name="categoryCode" id="category-select">
                    <option value=""></option>
                </select>
            </div>
        </div>
        <div class="layui-inline">
            <label class="layui-form-label">价格</label>
            <div class="layui-input-inline" style="width: 100px;">
                <input type="number" name="productPrice" placeholder="￥" step="0.01" lay-precision="0.01"
                       class="layui-input">
            </div>
        </div>
        <div class="layui-inline">
            <label class="layui-form-label">颜色</label>
            <div class="layui-input-inline" style="width: 100px;">
                <select name="productColor" lay-filter="color">
                    <option value=""></option>
                    <option value="black">黑色</option>
                    <option value="white">白色</option>
                    <option value="red" selected>红色</option>
                    <option value="pink">粉色</option>
                    <option value="purple">紫色</option>
                    <option value="golden">金色</option>
                    <option value="silver">银色</option>
                </select>
            </div>
        </div>
    </div>
    <div class="layui-form-item" pane>
        <label class="layui-form-label">状态</label>
        <div class="layui-input-block">
            <input type="radio" name="status" value="1" title="上架" checked>
            <input type="radio" name="status" value="0" title="下架">
        </div>
    </div>
    <div class="layui-upload">
        <button type="button" class="layui-btn" id="ID-upload-btn">
            <i class="layui-icon layui-icon-upload"></i> 上传图片
        </button>
        <blockquote class="layui-elem-quote layui-quote-nm" style="margin-top: 10px;">
            预览图：
            <div class="layui-upload-list" id="upload-preview"></div>
        </blockquote>
    </div>
    <div class="layui-form-item">
        <table class="layui-hide" id="ID-material-table" lay-filter="material-table"></table>
    </div>
    <div class="layui-form-item layui-form-text">
        <label class="layui-form-label">产品描述</label>
        <div class="layui-input-block">
            <textarea name="productDesc" placeholder="请输入内容" class="layui-textarea"></textarea>
        </div>
    </div>
    <div class="layui-form-item">
        <button class="layui-btn" lay-submit lay-filter="product-submit">确认</button>
        <button class="layui-btn layui-btn-primary" id="btn-product-cancel">取消</button>
    </div>
</form>
<script type="text/html" id="material-toolbar">
    <div class="layui-btn-container">
        <button class="layui-btn layui-btn-sm" lay-event="editMaterialList">编辑材料列表</button>
    </div>
</script>
<script type="text/html" id="material-tool">
    <div class="layui-clear-space">
        <a class="layui-btn layui-btn-xs layui-bg-red" lay-event="delete">删除</a>
    </div>
</script>
<script src="https://code.jquery.com/jquery-3.3.1.min.js"></script>
<script src="../../layui/v2.9.8/layui.js"></script>
<script src="../../qiniu/v3.4.2/qiniu.min.js"></script>
<script src="../../js/common/const.js"></script>
<script src="../../js/common/util.js"></script>
<script src="../../js/product/product-edit.js"></script>
</body>
</html>